package day240524.wrapper_class;

public class Q1 {
    public static void print(Object[] arr) {
        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i]);
        }
    }

    public static void m1(Object o) {
        System.out.println(o);
    }

    public static void main(String[] args) {
        String[] ss = new String[] {"abc", "xyz", "qwe"};
        print(ss);

        int[] is = new int[] {1, 5, 8};
        // 下面代码会报错
        //print(is);

        m1("123");
        int i = 123;
        m1(i);

        Integer x = 1;
        Object a = x;
        Object y = 2;
        Object b = 2L;


        // 用了包装类有一些额外的好处，比如...
        System.out.println(Integer.MAX_VALUE);
        System.out.println(Integer.MIN_VALUE);
    }
}
